@extends('user.layouts.layout')
@section('title', '编辑商户')
@section('content')
    <div class="mx-auto md:w-1/3 w-full bg-white rounded-lg p-6">
        <form action="{{ route('user.merchants.update', ['merchant' => $merchant->id]) }}" method="POST">
            {{ csrf_field() }}
            {{ method_field('PUT') }}
            <div class="block">
                <span class="text-gray-700 text-sm">回调类型</span>
                <div class="mt-2">
                    @foreach(\App\Models\Merchant::$notifyTypeMap as $k => $v)
                        <label class="inline-flex items-center">
                            <input type="radio" class="form-radio" name="notify_type" value="{{ $k }}" @if($merchant->notify_type == $k)checked @endif>
                            <span class="ml-2">{{ $v }}</span>
                        </label>
                    @endforeach
                </div>
                @error('notify_type')
                <p class="mt-2 text-sm text-red-600">{{ $message }}</p>
                @enderror
            </div>
            <div class="mt-6">
                <button class="py-3 px-4 text-center bg-indigo-600 rounded-md w-full text-white text-sm hover:bg-indigo-500">
                    提交
                </button>
            </div>
        </form>
    </div>
@endsection
